{extend name="admin@main"}

{block name="content"}
<div class="layui-form-item text-left">
    <button class="layui-btn layui-btn-danger" type='button'  onclick="window.history.back()">返 回</button>
</div>
<form class="layui-card layui-form">
    <div class="layui-card-body">
        <fieldset class="layui-elem-field layui-field-title" >
            <legend>个人信息</legend>
        </fieldset>

        <div class="layui-form-item">
            <label class="layui-form-label">昵称<br><span class="nowrap color-desc"></span></label>
            <div class="layui-input-inline">
                <input disabled class="layui-input" value="{$user.nickname|default=''}">
            </div>

            <label class="layui-form-label">openid<br><span class="nowrap color-desc"></span></label>
            <div class="layui-input-inline">
                <input disabled class="layui-input" value="{$user.openid}">
            </div>

        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">头像</label>
            <div class="layui-input-inline">
                <img data-tips-image src="{$user.avatar}" class="thumb-image" alt="">
            </div>

            <label class="layui-form-label">手机号<br><span class="nowrap color-desc"></span></label>
            <div class="layui-input-inline">
                <input disabled class="layui-input" value="{$user.phone|default=''}">
            </div>

        </div>


        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
            <legend>统计订单</legend>
        </fieldset>

        <div class="layui-form-item">
            <label class="layui-form-label">订单数量<br><span class="nowrap color-desc"></span></label>
            <div class="layui-input-inline">
                <input disabled class="layui-input" value="{$user.order_count|default=''}">
            </div>

            <label class="layui-form-label">消费金额（元）<br><span class="nowrap color-desc"></span></label>
            <div class="layui-input-inline">
                <input disabled class="layui-input" value="{$user.order_amount|default=''}">
            </div>

        </div>

        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
            <legend>订单记录</legend>
        </fieldset>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <table class="layui-table">
                    <tr>
                        <th>订单编号</th>
                        <th>商品名称</th>
                        <th>下单时间</th>
                        <th>商品总计</th>
                        <th>优惠券抵扣金额</th>
                        <th>订单金额</th>
                        <th>订单状态</th>
                    </tr>
                    {foreach $user['order'] as $key=>$vo}
                    <tr>
                        <td>{$vo.order_no|default=''}</td>
                        <td>{$vo.goods.goods_name|default=''}</td>
                        <td>{$vo.create_time|default=''}</td>
                        <td>{$vo.order_total|default=''}</td>
                        <td>{$vo.coupon_total|default=''}</td>
                        <td>{$vo.order_amount|default=''}</td>
                        <td>{$vo.status_text|default=''}</td>
                    </tr>
                    {/foreach}
                </table>
            </div>
        </div>
    </div>

    <div class="layui-form-item text-center">
        <button class="layui-btn layui-btn-danger" type='button'  onclick="window.history.back()">返 回</button>
    </div>
</form>
{/block}

{block name='style'}
<style>
    .layui-form-label{
        width: 10%;
    }
</style>
{/block}